package com.panopset.swing;

/**
 * Application document. May have a default resource.
 * 
 * @author Karl Dinwiddie
 * 
 */
public abstract class Document extends Field {

	private final String fn;

	public String getFileName() {
		return fn;
	}

	/**
	 * @param defaultResourcePath
	 *            Default resource path.
	 * @param fileName
	 *            Document namer.
	 */
	public Document(final String defaultResourcePath, final String fileName) {
		fn = fileName;
		setFieldValue(new FileValue(fileName));
		if (defaultResourcePath != null) {
			setFieldDefault(new ResourceDefault(defaultResourcePath));
		}
	}
}
